//
//  ClockFoot.m
//  test
//
//  Created by 朱圳 on 2018/1/4.
//  Copyright © 2018年 朱圳. All rights reserved.
//

#import "ClockFoot.h"

@implementation ClockFoot

- (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithReuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubViews];
    }
    return self;
}
-(void)createSubViews{
    self.contentView.backgroundColor = [UIColor whiteColor];
    UIButton *btn = [[UIButton alloc]init];
    [btn setTitle:@"确定打卡" forState:UIControlStateNormal];
    [btn addTarget:self action:@selector(clock:) forControlEvents:UIControlEventTouchUpInside];
    btn.backgroundColor = dominantColor;
    [btn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [self.contentView addSubview:btn];
    [btn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(self.contentView);
        make.size.mas_equalTo(CGSizeMake(120, 30));
        make.centerY.mas_equalTo(self);
    }];
    self.btn = btn;
}
-(void)clock:(UIButton *)sender{
    if(self.ClickBtnHandle){
        self.ClickBtnHandle();
    }
}
@end
